/**
 * <p>Copyright:Copyright(c) 2019</p>
 * <p>Company:Professional</p>
 * <p>Package:com.cesgroup.zw.spring.boot.example</p>
 * <p>File:AnnularPie.java</p>
 * <p>类更新历史信息</p>
 * @todo chanlong(陈龙) 创建于 May 29, 2019 6:02:36 PM
 */
package com.cesgroup.zw.spring.boot.library.echarts.annular.simple;

import com.cesgroup.zw.spring.boot.echarts.build.EChartsOption;
import com.cesgroup.zw.spring.boot.echarts.component.Legend;
import com.cesgroup.zw.spring.boot.echarts.component.Title;
import com.cesgroup.zw.spring.boot.echarts.enums.Align;
import com.cesgroup.zw.spring.boot.echarts.enums.Orient;
import com.cesgroup.zw.spring.boot.echarts.model.style.RichTextStyle;

/**
 * <p>描述: 环形图配置</p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date May 29, 2019 6:02:36 PM
 * @version 1.0.2019
 */
@SuppressWarnings("serial")
public class SimpleAnnularOption extends EChartsOption {

	public SimpleAnnularOption(SimpleAnnularParam param) {
		this.setTitle(new Title() {{
			this.setText(param.getTitle());
			this.setSubtext(param.getTotal());
			this.setTextStyle(new RichTextStyle() {{this.setFontSize(40);}});
			this.setSubtextStyle(new RichTextStyle() {{this.setFontSize(30);}});
			this.setTop("44%");
			this.setLeft(Align.center);
		}});
		this.setLegend(new Legend() {{
			this.setTop(Align.top);
			this.setRight("5%");
			this.setOrient(Orient.vertical);
			this.setTextStyle(new RichTextStyle() {{this.setFontSize(18);}});
		}});
	}
}
